Skip to content

[CI] (9da603e) rails/fizzy - #4403

Closed
wizard-ci-bot[bot] wants to merge 2 commits into
mainfrom
wizard-ci-9da603e-rails-fizzy
Closed

wizard-ci-bot[bot] wants to merge 2 commits into
mainfrom
wizard-ci-9da603e-rails-fizzy

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: wizard-pr
Trigger ID: 9da603e
App: rails/fizzy
App directory: apps/rails/fizzy
Workbench branch: wizard-ci-9da603e-rails-fizzy
Wizard branch: release-please--branches--main--components--wizard
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-10-06T15:58:47.600Z
Duration: 564.5s

YARA Scanner

✓ 296 tool calls scanned, 0 violations detected

No violations: ✓ 296 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR integrates PostHog into a Ruby on Rails app ("fizzy") using the posthog-ruby and posthog-rails gems. It adds an initializer with proper configuration, a capture_posthog_event helper in ApplicationController, custom event captures across 13 controllers, a posthog_distinct_id method on the User model, OpenTelemetry log forwarding, and automatic exception tracking via posthog-rails.

Files changed Lines added Lines removed
18 +98 -1

Confidence score: 5/5 🧙

  • capture_posthog_log fragility: The capture_posthog_log method guards on ENV vars being present but doesn't guard against Rails.application.config.x.posthog_logger being nil. If the initializer fails partway through (e.g., OTLP exporter raises), the logger won't be set but ENV vars are still present, causing a NoMethodError. [LOW]

File changes

Filename Score Description
config/initializers/posthog.rb 5/5 Well-structured initializer using PostHog.init block and PostHog::Rails.configure with exception tracking, ActiveJob instrumentation, and OTel log forwarding
app/controllers/application_controller.rb 4/5 Adds current_user, capture_posthog_event, and capture_posthog_log helpers — clean and idiomatic
Gemfile 5/5 Adds posthog-ruby, posthog-rails, and OTel gems correctly
.env.example 5/5 Documents both required env vars
app/models/user.rb 5/5 Adds posthog_distinct_id method using id.to_s — correct pattern per docs
Various controllers (13 files) 5/5 Meaningful event captures at appropriate action points with relevant properties

App sanity check ✅

Criteria Result Description
App builds and runs Yes All gems are valid, syntax is correct, no missing dependencies
Preserves existing env vars & configs Yes Only additive changes; join_codes_controller captures return value of redeem_if but doesn't change behavior
No syntax or type errors Yes All Ruby syntax is valid
Correct imports/exports Yes require 'posthog' is the correct require for posthog-ruby gem per docs
Minimal, focused changes Yes All changes serve the PostHog integration
Pre-existing issues None —

Issues

No critical or medium issues.

Other completed criteria

  • Environment variables documented in .env.example
  • .gitignore correctly updated to allow .env.example and ignore .env
  • Build configuration (Gemfile) is valid and parseable

PostHog implementation ✅

Criteria Result Description
PostHog SDKs installed Yes posthog-ruby (~> 3.0) and posthog-rails added to Gemfile
PostHog client initialized Yes Uses PostHog.init block with api_key and host, plus PostHog::Rails.configure for auto exception capture — matches documented Rails pattern exactly
capture() Yes PostHog.capture() called via helper across 13 controllers with distinct_id from user.posthog_distinct_id
identify() N/A Server-only app
Error tracking Yes auto_capture_exceptions: true, report_rescued_exceptions: true, auto_instrument_active_job: true — comprehensive error tracking
Reverse proxy N/A Server-only app

Issues

No critical or medium issues.

Other completed criteria

  • API key loaded from ENV["POSTHOG_PROJECT_TOKEN"] — never hardcoded
  • Host loaded from ENV["POSTHOG_HOST"] — correctly configured
  • capture_user_context: true with current_user_method: :current_user and user_id_method: :posthog_distinct_id properly wires user context
  • User model defines posthog_distinct_id returning id.to_s — correct distinct ID pattern per docs
  • OpenTelemetry log forwarding configured for PostHog Logs

PostHog insights and events ✅

Filename PostHog events Description
signups/completions_controller.rb account_created Tracks new account signups — funnel entry point
account/cancellations_controller.rb account_cancelled Tracks account deletion — churn signal
account/exports_controller.rb data_export_requested Tracks data export requests
boards_controller.rb board_created Tracks board creation with all_access property
boards/publications_controller.rb board_published, board_unpublished Tracks board publish/unpublish lifecycle
cards/closures_controller.rb card_closed, card_reopened Tracks card state transitions
cards/comments_controller.rb comment_created Tracks comment engagement
cards/publishes_controller.rb card_published Tracks card publishing with creation_type property
cards/steps_controller.rb step_created Tracks step creation within cards
join_codes_controller.rb member_joined Tracks team joins — conditional on successful join
webhooks_controller.rb webhook_created Tracks webhook creation with subscribed_action_count
webhooks/activations_controller.rb webhook_activated Tracks webhook activation
Auto exception capture capturedException Automatic via posthog-rails middleware for unhandled + rescued exceptions and ActiveJob failures

Issues

No critical or medium issues.

Other completed criteria

  • Events represent real user actions mapping to actual product flows (signup → board creation → card management → publishing)
  • Events enable product insights: can build signup-to-publish funnel, retention on board/card creation, churn analysis via account_cancelled
  • Key events include enriched properties (all_access, creation_type, subscribed_action_count)
  • No PII in event properties — distinct_id uses numeric user ID
  • Event names follow consistent snake_case [object]_[verb] convention

Reviewed by wizard workbench PR evaluator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants